package top.laoshuzi.designpatterns.base.created.abstract_factory.kotlin

import org.junit.Test

class Client {

    @Test
    fun operation() {

        //创建工厂
        val factoryA = FactoryManager.createFactory(FactoryManager.TYPE_FACTORY_A)
        val factoryB = FactoryManager.createFactory(FactoryManager.TYPE_FACTORY_B)

        //创建产品
        println(factoryA.makeProduct1().getName())
        println(factoryA.makeProduct2().getName())
        println(factoryA.makeProduct3().getName())

        println(factoryB.makeProduct1().getName())
        println(factoryB.makeProduct2().getName())
        println(factoryB.makeProduct3().getName())


    }

}